/*********************\
* Author:Dzlua
* QQ:505544956
* Time:2017/04/15
\**********************/
#include "LuaListLabelElement.h"

#define CObjPtr ((CListLabelElementUI*)m_cobj)

namespace DuiLib {

int LuaListLabelElement::EstimateSize(LuaState *L)
{
    LuaStack args(L);
    SIZE szAvailable = LuaHelperNS::GetSize(args[2]);
    SIZE sz = CObjPtr->EstimateSize(szAvailable);
    LuaHelperNS::PushSize(L, sz);
    return 1;
}

SDLUA_BEGIN_REGISTER(LuaListLabelElement, ListLabelElement, ListElement)
    SDLUA_REGISTER_FUN_LUA(LuaListLabelElement, EstimateSize, EstimateSize)
SDLUA_END_REGISTER

SDLUA_BEGIN_UNREGISTER(LuaListLabelElement, ListLabelElement)
SDLUA_END_UNREGISTER(ListLabelElement)

}

#undef CObjPtr